<link media="screen" rel="stylesheet" type="text/css"
	href="<?php echo ROOT_URL?>/public/admin.css" />
<center>
<div class="addcate">
	<form action="" method="post">		
			<h1>ADD CATEGORY</h1>
			 <?php 
			  if($this->errors){
				foreach($this->errors as $item)
				{echo '<span style="color:red;font-weight:bold;">'.$item.'</span><br>';}
			}
			  ?><br>
			<label>Type:</label>
				<select name="type">
					<option value="0">Website</option>
					<option value="1">Keyword</option>					
				</select>
			<br>
			 <!-- <label>Website:</label><input type="text" name="txtweb" size="25"/><br>
			<label>URL:</label><input type="text" name="txturl" size="25"/><br> -->
			<label>Category Name:</label><input type="text" name="txtname" size="25"/><br>
			<label>&nbsp;</label><input type="submit" name="ok" value="Add" />		
	</form>	
</div>
<div class="listcate">
	<h1>LIST CATEGORY</h1>
	<table class="table-3">
			<tr>
				<th>Name</th>
				<th>Type</th>	
				<th>Action</th>
			</tr>
			
		<?php foreach ($this->datacate as $item) {
			?>
			<tr>
				<td><?php echo $item['name'];?></td>
				<td>
				<?php if($item['type']==1){echo "Keyword";}else echo "Website";?></td>
				<td><a href="">Edit</a>&nbsp;&nbsp;<a href="">Del</a></td>
			</tr>
	<?php }?>
				
		
	</table>
</div>
</center>